package com.iterator.controller.wechat.wy.catalog;

import com.iterator.bean.web.pojo.BaseRespVo;
import com.iterator.bean.wechat.wy.catalog.CurrentVO;
import com.iterator.bean.wechat.wy.catalog.IndexVO;
import com.iterator.service.wechat.wy.catalog.WXCatalogService;
import com.sun.org.apache.regexp.internal.RE;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: Silence_W
 * @date: 2021-01-12 15:48
 **/
@RequestMapping("wx/catalog")
@RestController
public class CatalogController {

    @Autowired
    WXCatalogService wxCatalogService;

    @RequestMapping("current")
    public BaseRespVo current(Integer id){
        CurrentVO currentVO= wxCatalogService.queryCurrentCatalog(id);
        return BaseRespVo.ok(currentVO);
    }
    @RequestMapping("index")
    public BaseRespVo index(){
       IndexVO indexVO = wxCatalogService.queryCatalog();
        return BaseRespVo.ok(indexVO);
    }
}
